﻿<Application x:Class="Freshome.m.App" DispatcherUnhandledException="Application_DispatcherUnhandledException"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <Style x:Key="biggish" TargetType="Window">
            <Setter Property="SizeToContent" Value="WidthAndHeight" />
            <Setter Property="MinWidth" Value="1080" />
            <Setter Property="MinHeight" Value="720" />
            <Setter Property="MaxWidth" Value="1200" />
            <Setter Property="MaxHeight" Value="800" />
            <Setter Property="ShowInTaskbar" Value="True" />
            <Setter Property="ResizeMode" Value="CanResizeWithGrip" />
            <Setter Property="WindowStyle" Value="SingleBorderWindow" />
        </Style>
        <Style x:Key="smaller" TargetType="Window">
            <Setter Property="SizeToContent" Value="WidthAndHeight" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="ResizeMode" Value="NoResize" />
            <Setter Property="WindowStyle" Value="ToolWindow" />
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="2" />
            <Setter Property="Padding" Value="2" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <DataTemplate x:Key="rowHeaderTemplate">
            <TextBlock Name="rowHeader" Width="16"></TextBlock>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Item.Updated}" Value="True">
                    <Setter TargetName="rowHeader" Property="Text" Value="*"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Item.Created}" Value="True">
                    <Setter TargetName="rowHeader" Property="Text" Value="+"/>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
        <Style TargetType="{x:Type DataGridColumnHeader}">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="ToolTip" Value="{Binding Column.(ToolTipService.ToolTip), RelativeSource={RelativeSource Self}}"/>
                </Trigger>
            </Style.Triggers>
            <Setter Property="Foreground" Value="White"></Setter>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#477725" Offset="0.0" />
                        <GradientStop Color="#a9cc66" Offset="1.0" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="FontSize" Value="14"></Setter>
        </Style>
        <Style TargetType="{x:Type DataGridCell}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridCell}">
                        <Grid Background="{TemplateBinding Background}">
                            <ContentPresenter VerticalAlignment="Center" Margin="2" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="DataGrid">
            <Setter Property="MinColumnWidth" Value="20" />
            <Setter Property="MaxColumnWidth" Value="600" />
            <Setter Property="EnableRowVirtualization" Value="True" />
            <Setter Property="AutoGenerateColumns" Value="False" />
            <Setter Property="GridLinesVisibility" Value="None" />
            <Setter Property="RowBackground" Value="LightYellow" />
            <Setter Property="AlternatingRowBackground" Value="LightCyan" />
            <Setter Property="CanUserReorderColumns" Value="False" />
            <Setter Property="CanUserResizeRows" Value="False" />
            <Setter Property="RowHeaderTemplate" Value="{StaticResource rowHeaderTemplate}"/>
            <Setter Property="SelectionMode" Value="Single" />
            <Setter Property="Margin" Value="2" />
            <Setter Property="ColumnHeaderHeight" Value="30" />
        </Style>
    </Application.Resources>
</Application>
